- # locals:  header, available_locales, input_name, translations, info_text
- # optional locals: maxlength
.translation-wrapper
  - if header.present?
    .input-header
      = header
  = render :partial => "layouts/info_text", :locals => { :text => info_text.html_safe }
  - if 'slogan' == input_name
    .row
      .col-12
        = check_box_tag "community[show_slogan]", 1, @current_community.show_slogan?, class: "checkbox-row-checkbox"
        = label_tag "community[show_slogan]", t("admin.communities.edit_details.community_slogan_display"), class:"checkbox-row-label"
  - if 'description' == input_name
    .row
      .col-12
        = check_box_tag "community[show_description]", 1, @current_community.show_description?, class: "checkbox-row-checkbox"
        = label_tag "community[show_description]", t("admin.communities.edit_details.community_description_display"), class:"checkbox-row-label"

  - translations.each do |language_key, value|
    .row
      - if translations.size > 1
        .name-locale-label.col-2
          = label_tag "community_customizations[#{language_key}][#{input_name}]", value[:language], class: input_classes + ' label'
      .name-locale-text_field.col-10
        = text_field_tag "community_customizations[#{language_key}][#{input_name}]",
          value[:translation], class: input_classes, maxlength: defined?(maxlength) ? maxlength : nil,
          placeholder: defined?(placeholder) ? placeholder : ""
